package org.example.lotterysystem.service.postwinning;

import org.example.lotterysystem.dao.dataobject.WinningRecordDO;
import org.springframework.mail.MailSendException;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;

import java.util.List;

@Retryable(
        value = {MailSendException.class}, // 重试的异常类型
        maxAttempts = 3,                  // 最大重试次数
        backoff = @Backoff(
                delay = 1000,                 // 初始延迟1秒
                multiplier = 2)               // 延迟倍数(1,2,4秒...)
)
public interface PostWinningManager {
    //发送通知
    Integer send(List<WinningRecordDO> winningRecordDOList);
}
